<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Insert a string at the specified 16-bit unit offset</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="domcharacterdata.deletedata.html">DOMCharacterData::deleteData</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="domcharacterdata.replacedata.html">DOMCharacterData::replaceData</a></div>
 <div class="up"><a href="class.domcharacterdata.html">DOMCharacterData</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="domcharacterdata.insertdata" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">DOMCharacterData::insertData</h1>
  <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">DOMCharacterData::insertData</span> &mdash; <span class="dc-title">
   Insert a string at the specified 16-bit unit offset
  </span></p>

 </div>
 <div class="refsect1 description" id="refsect1-domcharacterdata.insertdata-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>DOMCharacterData::insertData</strong></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$offset</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span>
   )</div>

  <p class="para rdfs-comment">
   Inserts string <em><code class="parameter">data</code></em> at position <em><code class="parameter">offset</code></em>.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-domcharacterdata.insertdata-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">offset</code></em></dt>

     <dd>

      <p class="para">
       The character offset at which to insert.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">data</code></em></dt>

     <dd>

      <p class="para">
       The string to insert.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-domcharacterdata.insertdata-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   没有返回值。
  </p>
 </div>

 <div class="refsect1 errors" id="refsect1-domcharacterdata.insertdata-errors">
  <h3 class="title">错误／异常</h3>
  <p class="para">
   <dl>

    
     <dt>
<strong><code>DOM_INDEX_SIZE_ERR</code></strong></dt>

     <dd>

      <p class="para">
       Raised if <em><code class="parameter">offset</code></em> is negative or greater than the
       number of 16-bit units in data.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-domcharacterdata.insertdata-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="methodname"><a href="domcharacterdata.appenddata.html" class="methodname" rel="rdfs-seeAlso">DOMCharacterData::appendData()</a> - Append the string to the end of the character data of the node</span></li>
    <li class="member"><span class="methodname"><a href="domcharacterdata.deletedata.html" class="methodname" rel="rdfs-seeAlso">DOMCharacterData::deleteData()</a> - Remove a range of characters from the node</span></li>
    <li class="member"><span class="methodname"><a href="domcharacterdata.replacedata.html" class="methodname" rel="rdfs-seeAlso">DOMCharacterData::replaceData()</a> - Replace a substring within the DOMCharacterData node</span></li>
    <li class="member"><span class="methodname"><a href="domcharacterdata.substringdata.html" class="methodname" rel="rdfs-seeAlso">DOMCharacterData::substringData()</a> - Extracts a range of data from the node</span></li>
   </ul>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="domcharacterdata.deletedata.html">DOMCharacterData::deleteData</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="domcharacterdata.replacedata.html">DOMCharacterData::replaceData</a></div>
 <div class="up"><a href="class.domcharacterdata.html">DOMCharacterData</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
